-
-
Notifications
You must be signed in to change notification settings - Fork 267
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Also sync content into Azure File Share and R2 buckets #745
Also sync content into Azure File Share and R2 buckets #745
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
I've added a few codestyle proposal (2 are shellcheck not passing) but it's is ready to roll for me.
We need 2 other distincts reviews than mine to be sure we do not miss anything
Putting the PR in draft while working on the following error:
|
Found the culprit!
I'm updating the corresponding credentials on trusted.ci.jenkins.io, and will put the PR in ready for review afterward. |
Work in progress on this branch for now: https://github.com/jenkins-infra/update-center2/blob/pr-745/site/publish.sh I'll report the changes here when the tests will be conclusive. |
we now need to launch a |
Update: |
ae75b1a
to
11b661c
Compare
a6d9a3f
to
c9f636a
Compare
7a7348c
to
ec5cc0c
Compare
ec5cc0c
to
2822a48
Compare
Co-authored-by: Damien Duportal <damien.duportal@gmail.com>
2822a48
to
f3c6819
Compare
@daniel-beck @Wadeck @MarkEWaite @timja this PR is ready for review. I've put every new operations behind an opt-in flag, to be set to After approval and before merging, we intend to make a backup of updates.jenkins.io JSONs from pkg.origin.jenkins.io VM (maybe a daily one), and a snapshot of the disk where the update-center2 job cache is stored. |
The only change expected to this PR is the addition of an Ref: Related: |
The change will be similar to jenkins-infra/crawler#144, tested on trusted.ci.jenkins.io with our PoC job in the pr-745 branch: update-center2/site/publish.sh Lines 56 to 59 in d799620
Sourcing the script won't be needed with jenkins-infra/jenkins-infra#3323 as it will be directly executable from I'm waiting for jenkins-infra/jenkins-infra#3323 to be approved and merged before pushing it here so this PR remains valid in the mean time. |
Corresponding change pushed: ebfac65 I need to add an AzureServicePrincipal credentials to the update-center2 freestyle job, with the expected environment variable names like https://github.com/jenkins-infra/crawler/blob/a846b4e4ef7088f732c25e369ef56ab05bf1e77e/Jenkinsfile#L74-L77 I've also fixed the |
Credentials configured in update_center job on trusted.ci.jenkins.io. This pull request is complete and mergeable, ready for review. |
This PR allows synchronizing the content of updates.jenkins.io to the new Azure File Share and CloudFlare R2 buckets I've put in place for the migration of this service from the current VM to an high availability service on publick8s.
This migration will allow us to reduce our AWS cost by a third, thanks to the free outbound bandwidth of CloudFlare R2.
It will also allow us to benefit from a distributed service thanks to mirrorbits, and (later) the use of a bucket in each of the 6 regions offered by CloudFlare for its buckets: https://developers.cloudflare.com/r2/reference/data-location/#available-hints.
For this sync I'm using the
aws-cli
andazcopy
tools now installed on trusted agent since jenkins-infra/jenkins-infra#3099For
aws-cli
, it's using a non defaultupdates-jenkins-io
profile, stored in/home/jenkins/.aws
on the agent.For
azcopy
, it's using an account SAS token, stored manually as global credentials on trusted.ci.jenkins.io.We're not reusing blobxfer, which authenticates with a global storage account access key, less secure than the SAS token which is restricted to a specific file share, and later only on the agent IP address. (IP restriction disabled for now, will be restored later with the workaround mentioned in jenkins-infra/azure#496)
Test job, using a copy of the content of updates.jenkins.io instead of running generate.sh script as we don't have access in this test to the 400Go cache folder:
https://trusted.ci.jenkins.io:1443/job/update_center_test_lemeurherve_helpdesk2649/job/test-update-center-pr-745/
If this sync works as expected, the previous one in the script targeting the current VM will be removed, as the flag mechanism used to optionally sync azure.updates.jenkins.io.
Ref: jenkins-infra/helpdesk#2649